//
//  SNHEvent.h
//  Pods
//
//  Created by 陈建蕾 on 2018/6/22.
//

#import <Foundation/Foundation.h>

NS_ASSUME_NONNULL_BEGIN

//为方便拼接，首字母大写

#define KSNHInterfaceEventName(m) \
    extern NSString * const KSNHEventName##m;

#define KSNHImplementationName(m) \
    NSString * const KSNHEventName##m = @#m;

/** 事件传递 */
@interface SNHEvent : NSObject

+ (instancetype)shareInstance:(NSString *)eventName;
- (instancetype)initWithEvent:(NSString *)eventName;

/** event name */
@property (nonatomic, copy) NSString *eventName;
/** params */
@property (nonatomic, strong) id params;


KSNHInterfaceEventName(Sure)
KSNHInterfaceEventName(Cancel)
KSNHInterfaceEventName(Close)
KSNHInterfaceEventName(Open)

@end

NS_ASSUME_NONNULL_END

//代理事件
@protocol SNHEventDelegate <NSObject>
@optional
- (void)onActionEvent:(SNHEvent *)event;
@end
